<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>商城后台</title>
        <meta name="keywords"  />
        <meta name="description"  />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/identify.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/layout.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/account.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/style.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/control_index.css" />
		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/index.css" />

		<link rel="stylesheet" type="text/css" href="/shopping/Public/Admin/Css/page.css" />

		<script type="text/javascript" src="/shopping/Public/Admin/Js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="/shopping/Public/layui/layui.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/layer/layer.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/haidao.offcial.general.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/select.js"></script>
		<script type="text/javascript" src="/shopping/Public/Admin/Js/haidao.validate.js"></script>
	</head>

	<body>
		<div class="view-topbar">
			<div class="topbar-console">
				<div class="tobar-head fl">
					<a href="#" class="topbar-logo fl">
					<span><img src="/shopping/Public/Admin/Images/logo.png" width="20" height="20"/></span>
					</a>
					<a href="<?php echo U('Index/index');?>" class="topbar-home-link topbar-btn text-center fl"><span>管理控制台</span></a>
				</div>
			</div>
			<div class="topbar-info">
				<ul class="fr">
					<li class="fl dropdown topbar-notice topbar-btn">
					<a href="#" class="dropdown-toggle">
					<span class="icon-notice"></span>

					<!--have表示有消息，没有消息去掉have-->
					</a>
					</li>
					<li class="fl dropdown topbar-notice topbar-btn">
						<a href="/shopping" class="topbar-btn"><span class="fl text-normal">前台首页</span></a>
					</li>

					<li class="fl topbar-info-item">
					<div class="dropdown">
						<a href="#" class="topbar-btn">
						<span class="fl text-normal"><?php echo (session('admin')); ?></span>
						<span class="icon-arrow-down"></span>
						</a>
						<ul class="dropdown-menu">
							<li><a href="<?php echo U('Login/loginout');?>">退出</a></li>
						</ul>
					</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="view-body">
			<div class="view-sidebar">
				<div class="sidebar-content">
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">用户管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;" >
							<li>
								<a href="<?php echo U('User/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">用户列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('User/admin_index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">管理员列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('User/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加用户</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('User/admin_add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加管理员</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">产品管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Goods/index');?>">
								<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
								<span class="text-normal">产品列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Category/category');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">产品分类</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Category/addTopCategory');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加顶级分类</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Goods/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加商品</span>
								</a>
							</li>

						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">订单管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Order/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">订单管理</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Goods/evaluteall');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">评价管理</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">优惠券管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Coupon/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">优惠券列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Coupon/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加优惠券</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Coupon/give');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">发放优惠券</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">拼团管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Group/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">拼团列表</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Group/order');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">拼团商品订单</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('Group/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加商品拼团</span>
								</a>
							</li>
						</ul>
					</div>
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">秒杀管理</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('Seckill/index');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">秒杀商品列表</span>
								</a>
							</li>
							<!--<li>-->
								<!--<a href="<?php echo U('Seckill/order');?>">-->
									<!--<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>-->
									<!--<span class="text-normal">秒杀订单</span>-->
								<!--</a>-->
							<!--</li>-->
							<li>
								<a href="<?php echo U('Seckill/add');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">添加商品秒杀</span>
								</a>
							</li>
						</ul>


					</div>
					<!--<div class="sidebar-nav sidebar-nav-fold">-->
						<!--<div class="sidebar-title">-->
							<!--<a href="#">-->
								<!--<span class="icon"><b class="fl icon-arrow-down"></b></span>-->
								<!--<span class="text-normal">专题管理</span>-->
							<!--</a>-->
						<!--</div>-->
						<!--<ul class="sidebar-trans"style="overflow: hidden; display: none;">-->
							<!--<li>-->
								<!--<a href="#">-->
									<!--<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>-->
									<!--<span class="text-normal">专题列表</span>-->
								<!--</a>-->
							<!--</li>-->
							<!--<li>-->
								<!--<a href="#">-->
									<!--<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>-->
									<!--<span class="text-normal">添加专题</span>-->
								<!--</a>-->
							<!--</li>-->
						<!--</ul>-->
					<!--</div>-->
					<div class="sidebar-nav sidebar-nav-fold">
						<div class="sidebar-title">
							<a href="#">
								<span class="icon"><b class="fl icon-arrow-down"></b></span>
								<span class="text-normal">商城设置</span>
							</a>
						</div>
						<ul class="sidebar-trans"style="overflow: hidden; display: none;">
							<li>
								<a href="<?php echo U('System/info');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">店铺设置</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('System/pay');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">支付方式设置</span>
								</a>
							</li>
							<li>
								<a href="<?php echo U('System/express');?>">
									<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>
									<span class="text-normal">快递设置</span>
								</a>
							</li>
							<!--<li>-->
								<!--<a href="#">-->
									<!--<b class="sidebar-icon"><img src="/shopping/Public/Admin/Images/icon_order.png" width="16" height="16" /></b>-->
									<!--<span class="text-normal">功能开启</span>-->
									<!--&lt;!&ndash;5.未支付订单超时设置-->
									<!--设置时间(规定时间内未付款,自动取消订单)-->
									<!--6.领券中心是否开启设置-->
									<!--是/否(未开启不能使用优惠券)-->
									<!--7.首页分类显示个数设置-->
									<!--(首页显示几个分类)&ndash;&gt;-->
								<!--</a>-->
							<!--</li>-->
						</ul>

					</div>
				</div>
			</div>
			

    <div class="view-product">
        <div class="info-center">
            <div class="manage-head">
                <h6 class="padding-left manage-head-con">订单管理</h6>
            </div>
            <div class="offcial-table input-table table-margin clearfix">
                <div class="tr-th clearfix">
                    <div class="th w5 text-center">用户ID</div>
                    <div class="th w15 text-center">订单号</div>
                    <div class="th w5 text-center">类型</div>
                    <div class="th w10 text-center">优惠券(元)</div>
                    <div class="th w10 text-center">积分抵扣(元)</div>
                    <div class="th w10 text-center">实付金额(元)</div>
                    <div class="th w15 text-center">创建时间</div>
                    <div class="th w10 text-center">支付状态</div>
                    <div class="th w5 text-center">发货状态</div>
                    <div class="th w15 text-center">操作</div>
                </div>
                <?php if(empty($orderList)): ?><div class="tr non-info show border-bottom-none">
                        <span>没查询到符合条件的记录</span>
                    </div>
                <?php else: ?>
                    <?php if(is_array($orderList)): foreach($orderList as $key=>$value): ?><div class="tr show border-bottom-none text-center">
                            <div class="td w5"><?php echo ($value["user_id"]); ?></div>
                            <div class="td w15"><?php echo ($value["order_id"]); ?></div>
                            <div class="td w5"><?php echo ($value['goods_type']==0?'普通':'抢购'); ?></div>
                            <!--优惠券-->
                            <div class="td w10">
                                <?php if(($value["coupon_id"]) > "0"): if(is_array($couponList)): foreach($couponList as $key=>$item): if(($item["id"]) == $value["coupon_id"]): echo ($item["cou_pri"]); endif; endforeach; endif; ?>
                                    <?php else: ?>
                                    0<?php endif; ?>
                            </div>
                            <!--积分-->
                            <div class="td w10">
                                <?php if(($value["integral_num"]) > "0"): echo ($value["integral_num"]/100); ?>
                                    <?php else: ?>
                                    0<?php endif; ?>
                            </div>
                            <!--付的总金额-->
                            <div class="td w10"><?php echo ($value["price"]); ?></div>
                            <div class="td w15"><?php echo ($value["create_time"]); ?></div>
                            <div class="td w10"><?php echo ($value['is_pay']==1?"已付款":"未付款"); ?></div>
                            <!--发货状态-->
                            <div class="td w5">
                                <?php switch($value["is_deliver"]): case "0": ?>未发货<?php break;?>
                                    <?php case "1": ?>已发货<?php break;?>
                                    <?php case "2": ?>已收货<?php break; endswitch;?>
                            </div>

                            <!--操作-->
                            <div class="td w15">
                                <?php if(($value["is_pay"]) == "1"): if(($value["is_deliver"]) == "0"): ?><a href="<?php echo U('Order/send',array('order_id'=>$value['order_id']));?>" class="layui-btn layui-btn-normal">发货</a><?php endif; endif; ?>
                                <a href="<?php echo U('Order/detail',array('order_id'=>$value['order_id']));?>" class="layui-btn">查看详情</a>
                            </div>
                        </div><?php endforeach; endif; ?>
                    <div class="tr show border-bottom-none text-center">
                        <div class="sabrosus"><?php echo ($page); ?></div>
                    </div><?php endif; ?>

            </div>
        </div>

    </div>



		</div>

		<script>
			$(".sidebar-title").live('click', function() {
				if ($(this).parent(".sidebar-nav").hasClass("sidebar-nav-fold")) {
					$(this).next().slideDown(200);
					$(this).parent(".sidebar-nav").removeClass("sidebar-nav-fold");
				} else {
					$(this).next().slideUp(200);
					$(this).parent(".sidebar-nav").addClass("sidebar-nav-fold");
				}
			});
		</script>
	</body>

</html>